﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WcfContrib.Client.Behaviors
{
    /// <summary>
    /// Represents an interface for inspecting client operation invocations
    /// </summary>
    public interface IClientOperationInspectorBehavior
    {
        /// <summary>
        /// Occurs before service operation is called.
        /// </summary>
        /// <param name="clientChannel">The client channel.</param>
        /// <param name="context">The invocation context.</param>
        /// <returns>The correlation state</returns>
        object BeforeCall(ClientChannel clientChannel, ChannelInvokeContext context);

        /// <summary>
        /// Occurs after service operation was called.
        /// </summary>
        /// <param name="clientChannel">The client channel.</param>
        /// <param name="context">The invocation context.</param>
        /// <param name="result">The result.</param>
        /// <param name="correlationState">The correlation state.</param>
        void AfterCall(ClientChannel clientChannel, ChannelInvokeContext context, object result, object correlationState);
    }
}
